package com.hjc.business.service.impl;


import com.hjc.business.dao.UserinfoDao;
import com.hjc.business.dao.impl.UserinfoDaoImpl;
import com.hjc.business.mdoel.Userinfo;
import com.hjc.business.service.UserinfoServic;

public class UserinfoServicImpl implements UserinfoServic {

	UserinfoDao dao = new UserinfoDaoImpl();
	@Override
	public Userinfo login(String uname, String upwd) {
		
		return dao.findByNameAndPwd(uname,upwd);
	}
	@Override
	public int register(Userinfo user) {
		return dao.save(user);
	}
	@Override
	public Userinfo findById(int id) {
		return dao.findById(id);
	}

}
